#include "gd32f4xx.h"

uint32_t lock;

void test()
{
    if (__LDREXW(lock) == 1) return;
    if (__STREXW(&lock, 1) == 1) return;
}

void test()
{   
    if (lock == 1) return;
    if (__LDREXW(lock) == 1) return;
    if (__STREXW(&lock, 1) == 1) return;
}
